
<% include '/WEB-INF/includes/header.gtpl' %>

<h1>Provider list</h1>

<p></p>

<% import static scriptlerweb.RenderUtil.shortenTo %>
<% import static scriptlerweb.RenderUtil.fallback %>
<table border="1" id="scripts">
	<tbody>
		<% def order = request.getAttribute('order') 
		   if(order != null) { %>
		<tr>
			<th><a href='/provider/list/${order}name'>name</a></th>
			<th>url</th>
		</tr>
		<% } else { %>
		<tr>
			<th>name</th>
			<th>url</th>
		</tr>
		<% } %>
		<% 	def scripts = request.getAttribute('providers')
			scripts.each{ p -> %>
		<tr class="alt">
			<td><a href="/provider/show/${p.id}">${p.name}</a></td>
			<td><a href="${p.url}"><%= fallback("", p.url)%></a></td>
		</tr>
		<tr>
			<td colspan="3"><%= shortenTo(150, p.comment)  %>&nbsp;</td>
		</tr>
		<% } %>
	</tbody>
</table>

<% include '/WEB-INF/includes/footer.gtpl' %>

